package cn.sdormitory.smartdor.dao;

import cn.sdormitory.smartdor.dto.SdRentExportDTO;
import cn.sdormitory.smartdor.entity.SdRent;
import cn.sdormitory.smartdor.vo.req.SdRentQueryParam;
import cn.sdormitory.smartdor.vo.resp.SdRentVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface SdRentDao extends BaseMapper<SdRent> {

    List<SdRentVO> findSdRentList(@Param("startNum")int startNum, @Param("pageSize")int pageSize,
                                  @Param("queryParam") SdRentQueryParam queryParam);

    Integer findSdRentListCount(@Param("queryParam") SdRentQueryParam queryParam);

    List<SdRentExportDTO> findSdRentExportList(@Param("queryParam") SdRentQueryParam queryParam);

    List<SdRentExportDTO> findUnExpiredSdRentList();
}
